package com.example.demo2.controller;

import com.example.demo2.pojo.BlogProperties;
import com.example.demo2.pojo.PersonProperties;
import com.example.demo2.pojo.TestConfigBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class IndexController {

    @Autowired
    private BlogProperties blogProperties;

    @Autowired
    private PersonProperties personProperties;

    @Autowired
    private TestConfigBean testConfigBean;

    @RequestMapping("/")
    String index() {
        return blogProperties.getName() + "---" + blogProperties.getTitle() + "---"
                + personProperties.getAge() + "---" + personProperties.getSex() + "---"
                + testConfigBean.getName() + "---" + testConfigBean.getAge();

    }

}
